import React, { FC, useContext, useCallback, useState } from 'react';
import Manage from './routes/Manage/index';
import List from './routes/List/index';
import Login from './routes/Login/index';
import Batch from './routes/Batch/index';
import { HashRouter as Router, Route, Switch, Link } from 'react-router-dom';
import PrivateRoute from './routes/PrivateRoute';

// import ErrorBoundary from '@/component/common/ErrorBoundary/ErrorBoundary';
// import MenuNav from "./components/menu";
// import './util/util'



import './App.less';
// import context from './redux/context'


const App: FC = () => {


  return <Router>
    <Switch>
      <PrivateRoute path="/" exact component={Manage} />
      <PrivateRoute path="/home/:id" exact component={Manage} />
      <PrivateRoute path="/list" exact component={List} />
      <PrivateRoute path="/batch" exact component={Batch} />
      <Route path="/login" exact component={Login} />
    </Switch>
  </Router >



};


export default App;
